﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PromotionMan.aspx.cs" MasterPageFile="~/Admin/admin.master"
         Inherits="BlueMarineWebClient.Admin.Default" %>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="TopMainContent">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="MainScriptManager" runat="server" />
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
                            AssociatedUpdatePanelID="pnlPromotion" DisplayAfter="0">
            <ProgressTemplate>
                <div style="bottom: 50%; position: fixed; right: 50%; z-index: 1000000;">
                    <center><img src="/Web/images/load-indicator.gif" /></center>
                    Loading...
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <asp:UpdatePanel ID="pnlPromotion" runat="server">
            <ContentTemplate>
                <asp:Button runat="server" ID="btnLoadPro" OnClick="btnLoadPro_Click" Text="Load Promotion List"
                            CssClass="bluebutton" />
                <asp:Button ID="btnGetProImage" runat="server" OnClick="btnGetProImage_Click" Text="Get All Promotion Images"
                            CssClass="bluebutton" />
                <br />
                <asp:Label runat="server" ID="lblResult" Text="Click the button!" />
                <div style="width: 100%">
                    <div style="float: left; margin-top: 0px; width: 50%;">
                        <asp:DataList ID="dlPromotion" runat="server" Width="100%" 
                                      onselectedindexchanged="dlPromotion_SelectedIndexChanged">
                            <ItemTemplate>
                                <h2>
                                    <asp:Label ID="lblPrTitle" runat="server" Text='<%# Eval("PromotionTitle") %>'></asp:Label></h2>
                                <div class="image_wrapper image_fl">
                                    <span></span>
                                    <asp:Image ID="imgPrImage" runat="server" Width="130px" Height="107px" ImageUrl='<%# Eval("PromotionID", "../images/promotion/{0}.jpg") %>' />
                                </div>
                                <p>
                                    <asp:Label ID="lblProID" runat="server" Text='<%# Eval("PromotionID") %>'></asp:Label>
                                </p>
                                <p>
                                    start:
                                    <asp:Label ID="lblStart" runat="server" Text='<%# Eval("PromotionStart") %>'></asp:Label><br />
                                    end:
                                    <asp:Label ID="lblEnd" runat="server" Text='<%# Eval("PromotionEnd") %>' Font-Bold="True"
                                               ForeColor="Red"></asp:Label>
                                </p>
                                <p>
                                    <asp:Label ID="lblDes" runat="server" Text='<%# Eval("PromotionDescription") %>'></asp:Label>
                                </p>
                                <p>
                                    <asp:Button ID="btnView" runat="server" CommandName="Select" 
                                                class="bluebutton" Text="View" />
                                </p>
                                <div class="cleaner">
                                </div>
                            </ItemTemplate>
                        </asp:DataList>
                    </div>
                    <div style="float: right; margin-top: 0px; width: 50%;">

                        <asp:DataList ID="dlPromotionDetail" runat="server">
                            <ItemTemplate>
                                <h2>
                                    <asp:Label ID="lblPrTitle" runat="server" Text='<%# Eval("PromotionDetailID") %>'></asp:Label></h2>
                                <div class="image_wrapper image_fl">
                                    <span></span>
                                    <asp:Image ID="imgPrImage" runat="server" Width="130px" Height="107px" ImageUrl='<%# Eval("PromotionDetailID", "../images/promotiondetail/{0}.jpg") %>' />
                                </div>                    
                                <p>
                                    <asp:Label ID="lblDes" runat="server" Text='<%# Eval("PromotionContent") %>'></asp:Label>
                                </p>
                                <div class="cleaner">
                                </div>
                            </ItemTemplate>
                        </asp:DataList>

                    </div>
            
                </div>
           
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</asp:Content>